package com.zrrd.demo.JavaSE_test;

public class t1 extends Thread{
    private int num;

    public t1(int num) {
        this.num = num;
    }

    public void run() {
        for (int i = 1; i <= 1100; i++) {
            System.out.println(i);
            try {
                Thread.sleep(300);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
        }
    }

    public static void main(String[] args) {
        t1 r1 = new t1(1);
        t1 r2 = new t1(2);
        t1 r3 = new t1(3);
        r1.setPriority(1);
        r2.setPriority(10);
        r3.setPriority(5);
        r1.start();
        r2.start();
        r3.start();
    }
}
